package com.mkz.producer.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mkz.producer.entity.MsgLog;
import com.mkz.producer.mapper.MsgLogMapper;
import com.mkz.producer.service.MsgLogService;

/**
 * 消息日志记录
 *
 * @author KuangJianyu
 * @date 2020-04-16 13:19:44
 */
@Service
public class MsgLogServiceImpl extends ServiceImpl<MsgLogMapper, MsgLog> implements MsgLogService {

	//添加消息日志
	@Override
	public void addSendMsg(String topic, String content, String bustype, String sendok) {
		MsgLog temp = new MsgLog();
		temp.setBusType(bustype).setMsgContent(content).setMsgTopic(topic).setDealFlag(sendok).setDelFlag("1");
		try {
			baseMapper.insert(temp);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
